<!DOCTYPE html>
<html>
<head>
    <title>我的关注</title>
    <#include "/header.html">
</head>
<body>

<div id="vue-div" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            分类标签:
            <template>
                <el-select style="width:150px;" size="small" v-model="label" filterable clearable placeholder="请选择">
                    <el-option
                            v-for="item in labelOptions"
                            :key="item.id"
                            :label="item.label"
                            :value="item.label">
                    </el-option>
                </el-select>
            </template>
            <a class="btn btn-default" @click="query">所有</a>
            <a class="btn btn-default" @click="queryRecentStock(1)">近一年</a>
            <a class="btn btn-default" @click="queryRecentStock(3)">近三年</a>
            <a class="btn btn-default" @click="queryRecentStock(5)">近五年</a>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;添加关注</a>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;移除关注</a>
        </div>
    </div>

    <div v-show="addOrRemoveShow" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">股票code</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="stockCode" placeholder="股票code"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">分类标签</div>
                <template>
                    <el-select style="width:150px;" size="small" v-model="label" filterable allow-create clearable placeholder="请选择">
                        <el-option
                                v-for="item in labelOptions"
                                :key="item.id"
                                :label="item.label"
                                :value="item.label">
                        </el-option>
                    </el-select>
                </template>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input v-show="addShow" type="button" class="btn btn-primary" @click="save" value="添加"/>
                <input v-show="removeShow" type="button" class="btn btn-primary" @click="remove" value="移除"/>
                <input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/stock/myConcernStock.js?_${.now?long}"></script>
</body>
</html>
